<?php error_reporting(0);
session_start(); 
if (isset($_SESSION['connect'])) {
?>
<?php
include 'config.php';
$remove = mysql_real_escape_string($_POST["id"]);
?>
<?php
if(!($remove != NULL))
{
} else {
mysql_real_escape_string(mysql_query("DELETE FROM $tablename WHERE id = '$remove'")); }
header('Location: admin.php');
?>
<?php
}
else
{
header('Location: login.php');
}
?>

